#include<func.h>
int main(int argc,char*argv[])
{
    // ./homework04 file1
    ARGS_CHECK(argc,2);
    int fd = open(argv[1],O_WRONLY);
    ERROR_CHECK(fd,-1,"open");

    char buf[1000000] = {0};
    memset(buf,0,sizeof(buf));
    for(int i = 0;i<1000000;i++)
    {
        buf[i]="1";
    }
    write(fd,buf,1000000);
    close(fd);
    return 0;
}